package org.fei.demo;

import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Hello world!
 *
 */
@SpringBootApplication
@EnableEurekaServer
@RestController
public class CloudServerApp
{

    @RequestMapping("/hello")
    public String hello(){
        return "Hello Cloud Server.";
    }

    public static void main( String[] args )
    {
        new SpringApplicationBuilder(CloudServerApp.class).web(WebApplicationType.SERVLET).run(args);
        System.out.println( "========= Hello Cloud Server =========" );
    }
}
